<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件管理</title>
</head>
<body>
<h1>文件管理</h1>

<ul>
    {% for i in data %}
    <li>
        {% if not i.is_file %}
        <span>文件夹</span>
        <a href="{% url 'test' %}?path={{ i.path }}">{{ i.name }} </a>
        {% else %}
        <span>文件</span>
        <a href="{{i.path}}">{{ i.name }}</a>
        {% endif %}
    </li>
    {% endfor %}
</ul>

</body>
</html>